package com.ror.java.se.array;

import java.util.Arrays;

public class Demo03Arrays {
    public static void main(String[] args) {
        int[] arr = {124, 3, 563, 4, 687, 12, 1, 31, 103, -124};
        test01Sort(arr);
        test02Fill(arr);
    }

    public static void test01Sort(int[] arr) {
        System.out.print("Before:");
        System.out.println(Arrays.toString(arr));
        Arrays.sort(arr);
        System.out.print("After:");
        System.out.println(Arrays.toString(arr));
    }

    public static void test02Fill(int[] arr) {
        System.out.print("Before:");
        System.out.println(Arrays.toString(arr));
        Arrays.fill(arr, 2, 6, 0);
        System.out.print("After:");
        System.out.println(Arrays.toString(arr));
    }
}
